/*
 * Created: 2022-09-13 20:06:51
 * Author : 涛涛涛
 */

import React, { FC } from 'react';
import { View, Text } from '@tarojs/components';
import { styled } from 'linaria/react';
import { useClassName } from '@/utils/index';
export interface IProps extends ICompProps {
    /** 是否聚焦 */
    isFocus: boolean;
}
InputWrap.defaultProps = {} as Partial<IProps>;
function InputWrap(props: IProps) {
    const { className, style, isFocus, children } = props;
    const localClassName = useClassName('InputWrap', className, {
        isFocus: isFocus,
    });
    return (
        <RootView className={localClassName} style={style}>
            {children}
        </RootView>
    );
}
export default React.memo(InputWrap as FC<IProps>);
const cssBorderWidth = '2PX';
const RootView = styled(View)`
    &.InputWrap {
        padding: 0 30px;
        border-style: solid;
        border-color: #eee;
        border-width: ${cssBorderWidth};
        border-radius: 16px;
        display: flex;
        align-items: center;
        height: 80px;
        &.isFocus {
            border-color: #ff8828;
        }
    }
`;
